﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace hsgsSHXX.Web.Common
{
    public class BaseController : Controller
    {
        public BaseController()
        {
            //无参的构造  
        }
        public virtual void OnInit()
        {


            //这里判断是否登录
            if (Session["LoginID"] == null)
            {
               // Response.Redirect("/Admin/Login",);
                Response.Write("<script>window.alert('对不起，请重新登陆！');window.top.location.replace('/Login/Index')</script>");
                Response.Flush();
                Response.End();
            }
        }
        protected override void ExecuteCore()
        {
            base.ExecuteCore();
            OnInit();
        }

    }
}
